package com.jcsz.gulimall.product.feign.fallback;

import com.jcsz.common.exception.BizCodeEnume;
import com.jcsz.common.utils.R;
import com.jcsz.gulimall.product.feign.SeckillFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @className: SeckillFeignServiceFallback
 * @author: 一把Po吉他
 * @date: 2022/11/20 10:13
 * @version: 1.0
 **/
@Component
@Slf4j
public class SeckillFeignServiceFallback implements SeckillFeignService {
    @Override
    public R getSkuSeckilInfo(Long skuId) {
        log.info("熔断触发........");
        return R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(), BizCodeEnume.TOO_MANY_REQUEST.getMsg());
    }
}
